package com.xumx.mappers;

import com.xumx.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Xumx on 2022/5/18 10:18
 */
@Repository
@Mapper
public interface UserMapper {

    //根据用户名查询
    User queryUserByName(String name);

    //查询所有数据
    List<User> getAll();

    //新增用户
    void addUser(User user);

    //删除用户
    void deleteUser(Integer id);

    //修改用户
    void updateUser(User user);

    //根据用户id查找用户
    User findUserById(Integer id);

}
